<ion-content>
    <app-main-header
            [showBack]="true"
            [title]="'实名认证'"
            [specialClass]="'single-page-background'"></app-main-header>
    <div class="page-content single-page">
        <div class="single-content">
            <img class="identity-a-img" *ngIf="!updateImg"
                 src="./assets/image/temporary/identity-img.png" alt="">
            <div *ngIf="updateImg" class="identity-card-block">
                <div class="identity-card-item" (click)="addPhotoToGallery(0)">
                    <span *ngIf="!photoList[0]">请上传身份证（正面）</span>
                    <ion-img *ngIf="photoList[0]"
                             class="item-img"
                             [src]="'data:image/jpeg;base64,' + photoList[0]?.webviewPath"></ion-img>
                </div>
                <div class="identity-card-item"  (click)="addPhotoToGallery(1)">
                    <span *ngIf="!photoList[1]">请上传身份证（背面）</span>
                    <ion-img *ngIf="photoList[1]"
                             class="item-img"
                             [src]="'data:image/jpeg;base64,' + photoList[1]?.webviewPath"></ion-img>
                </div>
            </div>
            <div *ngIf="!updateImg">
                <div class="identity-a-item">
                    <span class="identity-label">真实姓名</span>
                    <span class="identity-value">医生姓名</span>
                </div>
                <div class="identity-a-item">
                    <span class="identity-label">身份证号</span>
                    <span class="identity-value">555444333322221111</span>
                </div>
            </div>
            <div class="identity-a-item" *ngIf="!updateImg">
                <span class="identity-label">认证结果</span>
                <span class="identity-value">已认证</span>
            </div>
            <div class="identity-a-footer">
                <button class="block-btn"
                        *ngIf="!updateImg"
                        (click)="changeAuthentication()">更新认证</button>
                <button class="block-btn"
                        *ngIf="updateImg"
                        [ngClass]="{'cancel-btn':!authImg.front || !authImg.back}"
                        [disabled]="!authImg.front && !authImg.back"
                        (click)="changeAuthentication()">确认提交</button>
                <button class="cancel-btn"
                        *ngIf="updateImg"
                        (click)="cancelUpdate()">取消
                </button>
            </div>
        </div>
    </div>
</ion-content>
